package com.shanzmoo.db.sys.entity.vo;

import com.shanzmoo.db.sys.entity.RoleEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * 角色选则信息
 * @author Gzhao 2020/12/30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@ApiModel("角色选则信息")
public class RoleSelectVo {

    @ApiModelProperty("角色ID")
    private Integer roleId;

    @ApiModelProperty("角色名")
    private String roleName;

    public static RoleSelectVo create(RoleEntity role) {
        return RoleSelectVo.builder()
                .roleId(role.getRoleId())
                .roleName(role.getRoleName())
                .build();
    }
}
